package com.longxiao.validator.handler.cond;

/**
 * 通用的验证条件
 * Created by houhongwei on 2017/5/16.
 */
public class CommCondition {

    // 是否必选参数
    protected boolean required = Boolean.TRUE;
    // 参数名称
    protected String name;
    // 错误信息
    protected String err;

    public CommCondition(boolean required, String name, String err) {
        this.required = required;
        this.name = name;
        this.err = err;
    }

    @Override
    public String toString() {
        return "CommCondition{" +
                "required=" + required +
                ", name='" + name + '\'' +
                ", err='" + err + '\'' +
                '}';
    }

    public boolean isRequired() {
        return required;
    }

    public void setRequired(boolean required) {
        this.required = required;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getErr() {
        return err;
    }

    public void setErr(String err) {
        this.err = err;
    }
}
